package com.air;

import org.openqa.selenium.By;

public class HomePage extends BasePage {

    //Elements
    String pageTitle = "Status";
    By bodyText = By.className("bodytext");
    By back = By.name("back");

    public HomePage() {
    }

    public AuthenticationPage back() {
        checkPageTitle(pageTitle);
        try {
            click(back);
        } catch (Error e) {
            verificationErrors.append(e.toString());
        }
        return new AuthenticationPage();
    }

    public String getBodyText() {
        checkPageTitle(pageTitle);
        try {
            return getText(bodyText);
        } catch (Error e) {
            verificationErrors.append(e.toString());
        }
        return null;
    }
}
